package com.slkj.shilixiaoyuanapp.entity;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.List;

/**
 * Created  on 2018-09-07
 *
 * @author 唐开阔
 * @describe 年级分组
 */
public class GradeEntity implements MultiItemEntity{
    public static final int TYPE_GROUP = 1;
    public static final int TYPE_CONTENT = 2;
    protected boolean expand = false;
    List<GradeEntity> yearClass;
    /**
     * year : 2013级
     * count : 6个班级
     * yearClass : [{"score":-1,"id":11,"yearClass":"2013级1班"},{"score":-1,"id":13,"yearClass":"2013级2班"},{"score":-1,"id":15,"yearClass":"2013级3班"},{"score":-1,"id":12,"yearClass":"2013级4班"},{"score":-1,"id":16,"yearClass":"2013级5班"},{"score":-1,"id":17,"yearClass":"2013级6班"}]
     */

    private String year;
    private String count;
    private int score;
    private int id;
    private String grade;
    public boolean isExpand() {
        return expand;
    }




    public void setExpand(boolean expand) {
        this.expand = expand;
    }

    @Override
    public int getItemType() {
        return yearClass != null ? TYPE_GROUP:TYPE_CONTENT;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public List<GradeEntity> getYearClass() {
        return yearClass;
    }

    public void setYearClass(List<GradeEntity> yearClass) {
        this.yearClass = yearClass;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }
}
